-
Notifications
You must be signed in to change notification settings - Fork 78
Ci updates #913
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Ci updates #913
Conversation
|
Looks like you've still got all the mass balance changes in here. Rebase? |
That's the plan, should be updated shortly. |
…e version 3.5 until pybind11 is updated
c3c1a80 to
b95eb8d
Compare
|
I've tried to help with figuring out why that last MacOS 15 failure is happening (an Expand here to see the actual AddressSanitizer global-buffer-overflow error messageI haven't been able to reproduce the problem locally either. I will note that it looks like the MacOS 15 runners use LLVM 18, while I've been testing with clang 16. I'm curious what specific versions @hellkite500 and @aaraney have been using. I did confirm that, if the main project CMake build is set up to link AddressSanitizer into the project targets (e.g., the testing executable), AddressSanitizer will also be linked into the test_bmi_c shared library (i.e., when the latter gets built as a project dependency of the former). If I had to guess at this point, the problem has something to do with the how AddressSanitizer handles memory for global items. I've found a few things (e.g., here and here) suggesting that kind of connection. I started to examine the LLVM codebase to see if I can figure out what's going on, but after some initial looking around, that's clearly going to require a much larger time investment. Maybe something that should be done eventually, but not right now. My suggestion as an immediate solution is to suppress AddressSanitizer errors from the test_bmi_c testing shared library, as discussed here. |
|
In my experience, ASan is almost certainly correct that there is an error, and that it is occurring during execution of the statement described by the stack trace. Thus, it's probably inappropriate to suppress it, and digging into the ASan implementation is likely a misguided rabbit hole. I'd recommend focusing on trying to find out the name of the BMI variable being queried for purposes of setting, such as by printing it to standard error like ASan writes its notification. Alternately, just audit all of the variables that you expect to go through that code path, and make sure the BMI metadata functions and the tables they're relying on are correct for them. |
I've been going through these steps as time permits and trying to understand what could be happening here. It is somewhat odd that the gcc sanitizer doesn't see this issue, and the ASan info produced in this given error is a bit puzzling as I trace through the test code and the code paths to the offending line. I'll try to write up my thoughts along the way here. |
|
So, the actual ASan code is shared between GCC and LLVM. The runtime library they use is imported from the same repository, and they generate what's supposed to be functionally identical instrumentation. If there's an error reported with one, but not the other, or between the same compiler on different platforms, or different versions of the same compiler, that would typically indicate some sort of ill-defined behavior of the underlying code being tested. Most typically, an uninitialized variable being used to index into some data structure, whose observed contents differ by the disparate circumstances. |
That's been my impression. What puzzles me here is both that it does not indicate an error in all environments/versions/scenarios and it is not at all apparent why the involved code would ever overflow the buffer.
It's not actually a BMI variable, but a static global array that holds BMI variable metadata. For reference: static const char *output_var_types[OUTPUT_VAR_NAME_COUNT] = { "double", "double" };The later code being flagged uses that same defined constant - static int Get_var_type (Bmi *self, const char *name, char * type)
{
size_t i;
// Check to see if in output array first
for (i = 0; i < OUTPUT_VAR_NAME_COUNT; i++) {
if (strcmp(name, output_var_names[i]) == 0) { // This is where ASan gets madAlso, if I'm interpreting this correctly (but I could use a sanity check), the overflow is actually being flagged when reading the first item of the array: |
|
OK, looking at this more closely, it starts to look like some sort of defect in ASan, or something managing to corrupt its shadow memory, which would involve truly impressive stack corruption. As it tells you, the offending memory access on address The shadow memory values covering My intuition here is that something is going wrong with either a mis-matched build between the I'm going to take a look at the build logs to see if anything jumps out at me. |
|
Per one of your links, did you try adding |
|
With what I've seen so far, I'm willing to entertain the notion that ASan is actually broken here. I've seen it simply fail to load a program before in weird enough circumstances, but this is the first time I've seen an apparent false positive error report. In grad school and previous jobs, I would have been able to relish the opportunity to dig in to the root cause, report it, and maybe actually fix this. Alas, not what we're paid for here. |
|
Besides, and maybe before https://groups.google.com/g/address-sanitizer/c/XJXOrSvN8vg?pli=1 makes me mildly concerned that maybe the test binary has not been compiled and/or linked with the sanitizer flags. Maybe Google's AI overview (ugh) also tipped me that there may be an initialization order issue in play here. I'll note that this error seems to be occurring on the very first library-global-variable memory access in the very first code called in the dynamically-loaded BMI module. That would also potentially point to a mis-matched compilation/linkage concern. Google's AI Overview as it appeared for me in response to the query string "addresssanitizer dlopen global false positive"An AddressSanitizer (ASan) false positive involving a dlopen call on a global variable is rare but most often caused by a dynamic initialization order issue or an uninstrumented library. Common causes and solutions 1. Dynamic Initialization Order Fiasco (C++) When a shared library is loaded with dlopen, its global variables are dynamically initialized. A false positive can occur if your main executable's global variables access a global from the shared library before the library has fully initialized, or after it has been unloaded via dlclose.
How to debug |
While not definitive analysis, I did confirm in my own development environment that if the CFLAGS and CXXFLAGS are set for using ASan, both the test executable (
It is ... and it isn't. The ASan error happens in first test of the Bmi_C_Formulation_Test class. I didn't notice or think about this earlier, but prior to those BMI C formulation tests, all the Bmi_C_Adapter_Test tests are run and pass. And Bmi_C_Adapter_Test does exercise the module's Curiously, the problem test actually has the ngen adapter class calling the test BMI module's |
|
Trying to get back to this, after falling down a rabbit hole and then having to step away from it ... unfortunately things are even less clear. I've made a copy of this PR branch in my fork, preparing to try and test the Curiously, the initial Action run following this did not reproduce the ASan error discussed above (see here for that original error). There were other errors though - this related to numpy and this different ASan error related to the Python integration. Both still only happen in the Mac runner. At first glance, I'm especially confused by the numpy one, both because it happened in the test_bmi_cpp runner job and because it didn't happen in the test_bmi_python runner job. For the new ASan error, I noticed the involved test_bmi_multi runner job sets some ASAN_OPTIONS (any context here that may be relevant @hellkite500?), recently added but also not exclusive to that job. And of course, neither of those were happening previously, at least not every time. Plus, what happened to the other ASan error? I'm going to try re-running the running in my fork to see what happens. |
|
Well, the same error happens in test_bmi_multi: a The previous error in test_bmi_cpp related to numpy didn't happen, but another ASan error did. This definitely looks similar to the previously discussed ASan error from the C test BMI module, except this time with the C++ test module and the |
|
Ok, I've managed to find some changes that seem to address at least some of issues. These are In my fork, in the First, commit ddf4de3 sets the Next, commit eebb25e applies All that said, sometimes the test_bmi_multi |
|
Ooh, could you paste in the text of one of those ODR errors? Regardless of all the other issues, those can cause lots of trouble in really weird ways, so it would be good to try to nail that down. |
|
Sure ... Click to expand example of ODR error in _test_pet_ runner jobRunning main() from /Users/runner/work/ngen/ngen/test/googletest/googletest/src/gtest_main.cc
[==========] Running 4 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 4 tests from Bmi_C_Pet_IT
[ RUN ] Bmi_C_Pet_IT.Test_InitModel
Error(Integration)::mass_balance: Error getting mass balance values for module 'Potential Evapotranspiration': BMI C model failed to get values for variable ngen::mass_in.
[ OK ] Bmi_C_Pet_IT.Test_InitModel (14 ms)
[ RUN ] Bmi_C_Pet_IT.Test_GetResponse
=================================================================
==6567==ERROR: AddressSanitizer: odr-violation (0x000102a9eb20):
[1] size=4 'pet_method_int' /Users/runner/work/ngen/ngen/extern/evapotranspiration/evapotranspiration/src/pet.c in libpetbmi.1.0.0.dylib
[2] size=4 'pet_method_int' /Users/runner/work/ngen/ngen/extern/evapotranspiration/evapotranspiration/src/pet.c in libpetbmi.1.0.0.dylib
These globals were registered at these points:
[1]:
#0 0x000102b56a54 in __asan_register_globals+0x9c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x12a54)
#1 0x000102b7fb84 in __asan::AsanApplyToGlobals(void (*)(__asan_global*, unsigned long), void const*)+0x7c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3bb84)
#2 0x000102b5699c in __asan_register_image_globals+0x34 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x1299c)
#3 0x000102a8dc60 in asan.module_ctor+0x18 (libpetbmi.1.0.0.dylib:arm64+0x5c60)
#4 0x000199deeef8 in invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const+0x1b8 (dyld:arm64e+0xfffffffffff56ef8)
#5 0x000199e2b898 in invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const+0x140 (dyld:arm64e+0xfffffffffff93898)
#6 0x000199e4b5c8 in invocation function for block in mach_o::Header::forEachSection(void (mach_o::Header::SectionInfo const&, bool&) block_pointer) const+0xec (dyld:arm64e+0xfffffffffffb35c8)
#7 0x000199e48354 in mach_o::Header::forEachLoadCommand(void (load_command const*, bool&) block_pointer) const+0xcc (dyld:arm64e+0xfffffffffffb0354)
#8 0x000199e49a94 in mach_o::Header::forEachSection(void (mach_o::Header::SectionInfo const&, bool&) block_pointer) const+0x78 (dyld:arm64e+0xfffffffffffb1a94)
#9 0x000199e2b368 in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const+0x200 (dyld:arm64e+0xfffffffffff93368)
#10 0x000199deecb0 in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const+0xac (dyld:arm64e+0xfffffffffff56cb0)
#11 0x000199df666c in dyld4::JustInTimeLoader::runInitializers(dyld4::RuntimeState&) const+0x20 (dyld:arm64e+0xfffffffffff5e66c)
#12 0x000199def45c in dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const+0x130 (dyld:arm64e+0xfffffffffff5745c)
#13 0x000199df3bec in dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const+0xb0 (dyld:arm64e+0xfffffffffff5bbec)
#14 0x000199def778 in dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const+0x2c8 (dyld:arm64e+0xfffffffffff57778)
#15 0x000199e13140 in dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const+0x73c (dyld:arm64e+0xfffffffffff7b140)
#16 0x000199e07f98 in dyld4::APIs::dlopen_from(char const*, int, void*)+0x46c (dyld:arm64e+0xfffffffffff6ff98)
#17 0x000199e07a7c in dyld4::APIs::dlopen(char const*, int)+0x7c (dyld:arm64e+0xfffffffffff6fa7c)
#18 0x000102b719b0 in dlopen+0x1bc (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x2d9b0)
#19 0x000102151300 in models::bmi::AbstractCLibBmiAdapter::dynamic_library_load() AbstractCLibBmiAdapter.cpp:86
#20 0x00010215de8c in models::bmi::Bmi_C_Adapter::execModuleRegistration() Bmi_C_Adapter.hpp:466
#21 0x0001021541d0 in models::bmi::Bmi_C_Adapter::construct_and_init_backing_model_for_type() Bmi_C_Adapter.hpp:556
#22 0x000102153bd0 in models::bmi::Bmi_C_Adapter::Bmi_C_Adapter(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool) Bmi_C_Adapter.cpp:64
#23 0x000102153890 in models::bmi::Bmi_C_Adapter::Bmi_C_Adapter(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) Bmi_C_Adapter.cpp:34
#24 0x000102120b84 in void std::__1::allocator<models::bmi::Bmi_C_Adapter>::construct[abi:ne190102]<models::bmi::Bmi_C_Adapter, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&>(models::bmi::Bmi_C_Adapter*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) allocator.h:165
#25 0x000102118c88 in realization::Bmi_C_Formulation::construct_model(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, geojson::JSONProperty, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, geojson::JSONProperty>>> const&) Bmi_C_Formulation.cpp:27
#26 0x000102126ad8 in realization::Bmi_Module_Formulation::inner_create_formulation(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, geojson::JSONProperty, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, geojson::JSONProperty>>>, bool) Bmi_Module_Formulation.cpp:330
#27 0x000102124b2c in realization::Bmi_Module_Formulation::create_formulation(boost::property_tree::basic_ptree<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, geojson::JSONProperty, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, geojson::JSONProperty>>>*) Bmi_Module_Formulation.cpp:8
#28 0x00010204d20c in Bmi_C_Pet_IT_Test_InitModel_Test::TestBody() Bmi_C_Pet_IT.cpp:172
#29 0x0001020c3f40 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) gtest.cc:2635
[2]:
#0 0x000102b56a54 in __asan_register_globals+0x9c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x12a54)
#1 0x000102b7fb84 in __asan::AsanApplyToGlobals(void (*)(__asan_global*, unsigned long), void const*)+0x7c (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x3bb84)
#2 0x000102b5699c in __asan_register_image_globals+0x34 (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x1299c)
#3 0x000102a8dc60 in asan.module_ctor+0x18 (libpetbmi.1.0.0.dylib:arm64+0x5c60)
#4 0x000199deeef8 in invocation function for block in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const+0x1b8 (dyld:arm64e+0xfffffffffff56ef8)
#5 0x000199e2b898 in invocation function for block in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const+0x140 (dyld:arm64e+0xfffffffffff93898)
#6 0x000199e4b5c8 in invocation function for block in mach_o::Header::forEachSection(void (mach_o::Header::SectionInfo const&, bool&) block_pointer) const+0xec (dyld:arm64e+0xfffffffffffb35c8)
#7 0x000199e48354 in mach_o::Header::forEachLoadCommand(void (load_command const*, bool&) block_pointer) const+0xcc (dyld:arm64e+0xfffffffffffb0354)
#8 0x000199e49a94 in mach_o::Header::forEachSection(void (mach_o::Header::SectionInfo const&, bool&) block_pointer) const+0x78 (dyld:arm64e+0xfffffffffffb1a94)
#9 0x000199e2b368 in dyld3::MachOAnalyzer::forEachInitializer(Diagnostics&, dyld3::MachOAnalyzer::VMAddrConverter const&, void (unsigned int) block_pointer, void const*) const+0x200 (dyld:arm64e+0xfffffffffff93368)
#10 0x000199deecb0 in dyld4::Loader::findAndRunAllInitializers(dyld4::RuntimeState&) const+0xac (dyld:arm64e+0xfffffffffff56cb0)
#11 0x000199df666c in dyld4::JustInTimeLoader::runInitializers(dyld4::RuntimeState&) const+0x20 (dyld:arm64e+0xfffffffffff5e66c)
#12 0x000199def45c in dyld4::Loader::runInitializersBottomUp(dyld4::RuntimeState&, dyld3::Array<dyld4::Loader const*>&, dyld3::Array<dyld4::Loader const*>&) const+0x130 (dyld:arm64e+0xfffffffffff5745c)
#13 0x000199df3bec in dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const::$_0::operator()() const+0xb0 (dyld:arm64e+0xfffffffffff5bbec)
#14 0x000199def778 in dyld4::Loader::runInitializersBottomUpPlusUpwardLinks(dyld4::RuntimeState&) const+0x2c8 (dyld:arm64e+0xfffffffffff57778)
#15 0x000199e13140 in dyld4::APIs::dlopen_from(char const*, int, void*)::$_0::operator()() const+0x73c (dyld:arm64e+0xfffffffffff7b140)
#16 0x000199e07f98 in dyld4::APIs::dlopen_from(char const*, int, void*)+0x46c (dyld:arm64e+0xfffffffffff6ff98)
#17 0x000199e07a7c in dyld4::APIs::dlopen(char const*, int)+0x7c (dyld:arm64e+0xfffffffffff6fa7c)
#18 0x000102b719b0 in dlopen+0x1bc (libclang_rt.asan_osx_dynamic.dylib:arm64e+0x2d9b0)
#19 0x000102151300 in models::bmi::AbstractCLibBmiAdapter::dynamic_library_load() AbstractCLibBmiAdapter.cpp:86
#20 0x00010215de8c in models::bmi::Bmi_C_Adapter::execModuleRegistration() Bmi_C_Adapter.hpp:466
#21 0x0001021541d0 in models::bmi::Bmi_C_Adapter::construct_and_init_backing_model_for_type() Bmi_C_Adapter.hpp:556
#22 0x000102153bd0 in models::bmi::Bmi_C_Adapter::Bmi_C_Adapter(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool) Bmi_C_Adapter.cpp:64
#23 0x000102153890 in models::bmi::Bmi_C_Adapter::Bmi_C_Adapter(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>) Bmi_C_Adapter.cpp:34
#24 0x000102120b84 in void std::__1::allocator<models::bmi::Bmi_C_Adapter>::construct[abi:ne190102]<models::bmi::Bmi_C_Adapter, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&>(models::bmi::Bmi_C_Adapter*, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, bool&&, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>&) allocator.h:165
#25 0x000102118c88 in realization::Bmi_C_Formulation::construct_model(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, geojson::JSONProperty, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, geojson::JSONProperty>>> const&) Bmi_C_Formulation.cpp:27
#26 0x000102126ad8 in realization::Bmi_Module_Formulation::inner_create_formulation(std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, geojson::JSONProperty, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, geojson::JSONProperty>>>, bool) Bmi_Module_Formulation.cpp:330
#27 0x000102124b2c in realization::Bmi_Module_Formulation::create_formulation(boost::property_tree::basic_ptree<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>>&, std::__1::map<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>, geojson::JSONProperty, std::__1::less<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>>>, std::__1::allocator<std::__1::pair<std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const, geojson::JSONProperty>>>*) Bmi_Module_Formulation.cpp:8
#28 0x00010204d20c in Bmi_C_Pet_IT_Test_InitModel_Test::TestBody() Bmi_C_Pet_IT.cpp:172
#29 0x0001020c3f40 in void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>(testing::Test*, void (testing::Test::*)(), char const*) gtest.cc:2635
==6567==HINT: if you don't care about these errors you may set ASAN_OPTIONS=detect_odr_violation=0
SUMMARY: AddressSanitizer: odr-violation: global 'pet_method_int' at /Users/runner/work/ngen/ngen/extern/evapotranspiration/evapotranspiration/src/pet.c in libpetbmi.1.0.0.dylib
==6567==ABORTING
/Users/runner/work/_temp/3bc8ad1e-8735-4e77-9e5f-8132849d396a.sh: line 1: 6567 Abort trap: 6 ./cmake_build/test/compare_pet
Error: Process completed with exit code 134. |
I take it back ... whether the error occurs does not appear to be directly related to the changes. Consider these Action runs:
Commits from 1 and 3 are no different, and changes between 1/3 and 2 don't seem to be meaningfully different in a way that could cause problems. |
|
Ok, I think I may have at least figured out how to reproduce some of these errors locally. CMake will default to applying the I also ran some experiments with test_bmi_c and the original buffer overflow that was discussed. To be clear: I compiled things only once, and ran the same executable repeatedly. In 1500 attempts running |
|
I ran another similar set of experiments in my Mac dev environment, compiling with At this point, I suggest we adjust the Actions so that As far as I can tell, @hellkite500, @aaraney, @PhilMiller: thoughts? We can assemble and discuss in more detail if needed. |
Pulled from #909 into its own PR in order to better address some address sanitizer failures on the updated macos-15 runners. I'll rebase once that PR lands.